package com.joy.abilityintnet;

import com.joy.abilityintnet.slice.OneAbilitySlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class OneAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(OneAbilitySlice.class.getName());
    }

    @Override
    protected void onActive() {
        super.onActive();
        Intent intent = new Intent();
        //将参数传到main
        intent.setParam("key", "早上好，今天天气真不错");
        setResult(0, intent);
    }
}
